<%--@elvariable id="courseId" type="java.lang"--%>
<%--
 Created by IntelliJ IDEA.
 User: gaoyang
 Date: 14-4-28
 Time: 下午3:33
 To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <%@include file="../../includes/common.jsp" %>
    <title>课件评分</title>
</head>
<body>
<div>
    <form action="">
        <fieldset>
            <legend></legend>
            <div class="form-group">
                <label class="control-label" for="quality"></label>

                <select class="controls" id="quality" style="margin-left: 60px">
                    <option style="margin-left: 60px" value="1">差
                    </option>
                    <option style="margin-left: 60px" value="2">中
                    </option>
                    <option style="margin-left: 60px" value="3" selected=selected>好
                    </option>
                </select>
            </div>
            <div style="margin-top: 20px;margin-left: 100px">
                <input type="button" id="saves" class="btn btn-primary" onclick="save()" value="保存"/>
                <input type="button" onclick="quit()" class="btn btn-primary" value="取消"/>
            </div>
        </fieldset>
    </form>
</div>
</body>
</html>
<script type="text/javascript">

    function save() {
        $.ajax({
            url: basePath + "statistic/assessQuality",
            data: {
                id:${courseId},
                quality: $("#quality").find("option:selected").val()
            },
            dataType: "json",
            type: "POST",
            success: function () {
                $.messager.alert("成功", "评分成功！", "", function () {
                    parent.$("#dataEdit").dialog('close');
                    parent.query();
                })
            },
            error: doError
        })
    }

    function quit() {
        parent.$("#dataEdit").dialog('close');
    }
</script>